### 2. Instrument your application
**For Kubernetes deployments with zero-code instrumentation:**

```yaml
apiVersion: openlit.io/v1alpha1
kind: AutoInstrumentation
metadata:
  name: dynatrace-instrumentation
  namespace: default
spec:
  selector:
    matchLabels:
      instrument: "true"
  python:
    instrumentation:
      provider: "openlit"
      version: "latest"
  otlp:
    endpoint: "https://YOUR_ENVIRONMENT_ID.live.dynatrace.com/api/v2/otlp"
    headers: "Authorization=Api-Token YOUR_DYNATRACE_API_TOKEN"
    timeout: 30
  resource:
    environment: "production"
    serviceName: "my-ai-service"
```

Replace:
1. `YOUR_ENVIRONMENT_ID` with your Dynatrace environment ID.
   * Example: `abc12345.live.dynatrace.com`
1. `YOUR_DYNATRACE_API_TOKEN` with the API token you generated in Step 1.

Refer to the [OpenLIT Operator Documentation](/latest/operator/overview) for more advanced configurations and use cases.
